<script setup lang="ts">
// import HelloWorld from './components/HelloWorld.vue'
import { onMounted, ref } from 'vue';
import { bookItem, Numbric } from './types/app';
// import axios from './utils/http';
const message = ref<Numbric>('Hello, Vue 3!')


// onMounted( async()=>{

//   const res = await axios.get<bookItem[]>('/books/queryall');
//   console.log(res.data);

// })
const updateTitle = (): void => {
  message.value = 'Hello , World!';
}


// const getTitle = (val: Numbric) => {
//   message.value = val
// }
</script>

<template>
  <Router-Link to="/home">主页</Router-Link> |
  <Router-Link to="/cate">分类</Router-Link> |
  <Router-Link to="/login">登陆</Router-Link> |
  <Router-Link to="/register">注册</Router-Link>
  <Router-View></Router-View>
  <div>
    <h1>{{ message }}</h1>
    <input type="button" @click="updateTitle" value="修改标题">
  </div>
  <hr>


  <!-- <HelloWorld msg="Vite + Vue" @send-title="getTitle" :message="message"   />  -->



</template>

<style scoped>

</style>
